<!DOCTYPE HTML><html>
<head>
<? echo $h->meta($title, $kwd, $dpn); ?>
<? require_once("lib.php"); ?>
</head>
<body>
<? include_once("header.php"); ?>
<div id="wrap">
		<div class="breadcrumb">
			<a href="./"><?=WEB_INDEX_PAGE?></a> &gt; <span><?=$title?></span>
		</div><!--breadcrumb end-->
	<div id="" class="left w720">
			<div class="">
				<div class="h2pros">
					<h2><? echo '"'.$s.'" - '.WEB_SEARCHED_RESULT; ?></h2>
                    <ul class="tags_change"><li class="tags_selected"><input type="hidden" name="product" value="1"><span><?=WEB_SEARCH_PRODUCT?></span></li><li class="tags_selected"><input type="hidden" name="document" value="2"><span><?=WEB_SEARCH_DOCUMENT?></span></li></ul>
				</div>
                <script type="text/javascript">
                    $(function(){
                        <?
                        if($type==1){
                            ?>
                            $('.tags_selected').eq(0).addClass('tags_click');
                        <?
                        }elseif($type==2){?>
                            $('.tags_selected').eq(1).addClass('tags_click');
                        <?}?>
                        $('.tags_selected').mouseover(function(){
                            $(this).addClass('tags_over')
//                            $('.tags_selected').eq(0).addClass('tags_click');

                        });
                        $('.tags_selected').mouseout(function(){
                            $(this).removeClass('tags_over');
                        });

                        $('.tags_selected').click(function(){
                            var tags_type = $(this).children('input:hidden').val();
//                            $('.tags_selected').eq(0).addClass('tags_click');
                            location.href = 'search.php?s=<?=$s?>&type='+tags_type+'&page=1';
//                            var tags_index = $(this).index();
//                            $('.tags_select').eq(Math.abs(tags_index - 1)).addClass('hide');
//                            $('.tags_select').eq(tags_index).removeClass('hide');
                        });
                    });
                </script>
                <div class="tags_select">
				<ul class="pros">
				<?
                if($type == 1){
					$str=''; $k=0;
					foreach ($info as $val) {
						$tem_link=seo_url($val['name_'.$lang]).'-p-'.$val['id'].'.html';
						$tem_pic=PRODUCT_PIC_HOST.$val['small_pic'];
						$tem_name=str_cut($val['name_'.$lang],PRODUCT_TITLE_DISPLAY_LENGTH,$lang);
						$tem_price=price($val).discount($val);
						$curr=''; if($k%4==0) $curr=' d ';
						$str.='<li class="pros_li '.$curr.'">
						<div class="pro_box">
							<div class="pro">
								<div class="image"><a href="'.$tem_link.'"><img src="'.$tem_pic.'" width="'.PRODUCT_SMALL_PIC_WIDTH.'" height="'.PRODUCT_SMALL_PIC_HEIGHT.'" /></a></div>
								<div class="price"><span><span>'.$currency_sign.'</span>'.$tem_price.'</span></div>
								<div class="pname"><a href="'.$tem_link.'">'.str2color($s,$tem_name,'#ff0000').'</a></div>';
                        $tags_list_arr = tagsInfo($val['id'], $type, $s);
                        $tags_i = '';
                        foreach($tags_list_arr as $val_t){
                            $tags_i .= '<a class="list_more" href="search.php?tag_id='.$val_t['id'].'">'.str2color($s,$val_t['name_'.$lang],'#ff0000').'</a>';
                        }
                        $str.='<div class="tags_list">'.WEB_SEARCH_TAGS.'：'.$tags_i.'</div></div>
						</div>
					</li>';

					$k++;
					if($k%4==0) $str.='<li class="pro_lace"></li>';
					}
					echo $str;
					if($k==0) echo '<p class="red"><br />* '.WEB_NO_PRODUCT.'.<br /><br /></p>';
                }else{
                    $str='';$k=0;
//                    pre($info);
                    foreach ($info as $val) {
                        $str.='<li class="tags_news"><div><span class="time_l">'.$val['created_time'].'</span><a href="new-'.$val['id'].'.html">'.str2color($s,$val['name'],'#ff0000').'</a></div>';
                        $str.='<div>'.str2sub($val['content'],200,1).'</div>';
                        $tags_list_arr = tagsInfo($val['id'], $type, $s);
                        $tags_i = '';
                        foreach($tags_list_arr as $val_t){
                            $tags_i .= '<a class="list_more" href="search.php?tag_id='.$val_t['id'].'">'.str2color($s,$val_t['name_'.$lang],'#ff0000').'</a>';
                        }
                        $str.='<div class="tags_list">'.WEB_SEARCH_TAGS.'：'.$tags_i.'</div>
					</li>';
                        $k++;
                    }
                    echo $str;
                    if($k==0) echo '<p class="red"><br />* '.WEB_NO_SUCH_DATA.'.<br /><br /></p>';
                }
				?>
				</ul>
				<div class="clear"></div>
				<?echo echo_page($page, $pages, $url.'-'.$s.'-t'.$type.'-p',$lang); ?>
                    </div>
			</div><!--. featured product-->
	</div><!--# featured_and_ad_right-->
		<div id="" class="w220 right">
			<div class="side_box">
				<div class="side_title"><h3><?=WEB_HOT_ITEMS?></h3></div>
				<div class="side_boxer">
					<ul class="side_pros">
						<?
							$str='';
							foreach($arr_hot as $val){
								$tem_link=seo_url($val['name_'.$lang]).'-p-'.$val['id'].'.html';
								$tem_pic=PRODUCT_PIC_HOST.$val['small_pic'];
								$tem_name=str_cut($val['name_'.$lang],PRODUCT_TITLE_DISPLAY_LENGTH,$lang);
								$tem_price=price($val).discount($val);
								$curr=''; if($k%4==0) $curr=' d ';
								$str.='<li class="side_pro">
								<div class="image"><a href="'.$tem_link.'"><img src="'.$tem_pic.'"  width="'.PRODUCT_THUMBNAIL_PIC_WIDTH.'" height="'.PRODUCT_THUMBNAIL_PIC_WIDTH.'" /></a></div>
								<div class="pname"><a href="'.$tem_link.'">'.$tem_name.'</a></div>
								<div class="price red"><strong><span>'.$currency_sign.'</span>'.$tem_price.'</strong></div>
								<div class="clear"></div>
							</li>';
							}
							echo $str;
						?>
					</ul>
				</div>
			</div>
			<div class="px20"></div>
			<? if($has_history){ ?>
			<div class="side_box history">
				<div class="side_title"><h3><?=WEB_RECENTLY_VIEWED?></h3><a class="hand right clear_his" onclick="history_clear();">&nbsp;</a></div>
				<div class="side_boxer">
					<ul class="side_pros">
						<?
							$str='';
							foreach($arr_history as $val){
								$tem_link=seo_url($val['name_'.$lang]).'-p-'.$val['id'].'.html';
								$tem_pic=PRODUCT_PIC_HOST.$val['small_pic'];
								$tem_name=str_cut($val['name_'.$lang],PRODUCT_TITLE_DISPLAY_LENGTH,$lang);
								$tem_price=price($val).discount($val);
								$curr=''; if($k%4==0) $curr=' d ';
								$str.='<li class="side_pro">
								<div class="image"><a href="'.$tem_link.'"><img src="'.$tem_pic.'"  width="'.PRODUCT_THUMBNAIL_PIC_WIDTH.'" height="'.PRODUCT_THUMBNAIL_PIC_WIDTH.'" /></a></div>
								<div class="pname"><a href="'.$tem_link.'">'.$tem_name.'</a></div>
								<div class="price red"><strong><span>'.$currency_sign.'</span>'.$tem_price.'</strong></div>
								<div class="clear"></div>
							</li>';
							}
							echo $str;
						?>
					</ul>
				</div>
			</div>
			<? } ?>
		</div><!--right-->
		<div class="clear"></div>
	<div class="px20"></div>
	<div class="clear"></div>
</div>
<? include("footer.php"); ?>
</body>
</html>